update

cleaned and documented