first copy
code documented and cleaned
added author