changed block hover and click function