Added a few comments for clarity