a bit refactored code
refactored code, added opacity feature, commented code