resolved issues and merged sandeep's code