added keyword detection
fixed problems, added keyword