the if don't work correctly