added interactive functionality to dragon program