added parallel to exec and fixed bug in exec