add api error handling, start md5 stuff