FEATURE: added comments describing algo