take this version it have your brevious work.

this code contains you previous work.