I think this code with appropriate comments has better visibility.