command interpreter using 
observer pattern