make the posting asynchronous
clean up the code a bit