seperated logic