Added code and formatting