why not use one statement for those 2 ifs?