corrected commented code, return types were not documented.