some damn if statements