Move keyWord function to seperate file