first draft

mean to solve
final with comments