get rid of if clause