removed commented lines. reorganized for readability