contains proper logic and comments