added opacity function