Adding the opacity change functionality