separated function for create_keyword