timestamp stuff.. and error handling