set transition on opacity. cleaning code as well