removed unnecessary code for click/hover function