Implemented hovering function, moved code in