modified some code to output keywords