cleaning, adding comments and documentation (to be completed)
merge