Added update instead of truncate

It's uggly needs a huge refactor