refactored 502 comments with directives