added parallel implementation for some functions, some are still missing