part of task4 completed. There are few bugs on it