everything except output parsing seems to work
data output parsing works
cleaned up with comments and stuff
error handling