refactored conversion from inclusive to exclusive scan by not using extra memory; added profiling (58.9 ms)