decent working version.Better functionalities to be added-4th version