adding comments to make it more readable