fixed issue with saving bytes to db, reformat model