Added more comments and clarification