fixed timing issue, cleaned up code a bit. next step is to hookup dropbox