How to use logic..