troubleshoot if statement