removed unnecessary ifs and lowers