added parallel scan implementation