Broadened parallel implementation (supporting parallel for and pmap, to be used depending on the system specs)