slight commenting and documentation