class for listening to the controller now
working code for demo. improve by subscription and callbacks instead of while loops