cleaned up code, fixed opacity issue