code commented, debuggin console.log removed, function naming changed