working without any ifs