added commenting and modified arguments