working atlast, can start working on part 2