can now update records from table!!

lots of messy stuff though