Adding function for executing functions in parallel and returning result