initial api commit
added event stuff