added descriptive comment and reorganized