make opacity load function a base function and amend other code accordingly