quick refactor, broke keywords building into another function