hover to change opacity some refactoring