solved print_words
made a helper function
solved print_top