working prototype, working on debugging