changed keyword testing to one function