changed to fade transition and cleanup unused code