making progress just mainloop and API tie in left!