on click and hover functions working