attempted to refactor built tags procedure in lessons controller