add fade-in and fade-out transitions