adding comments, making the code more readable, finish e2e flow of map