reformatting - comments and refactored delegate method