refactored comments and structure