switched to mouseenter and mouseleave
beautified
some refactoring