update opacity