logic mistake