Added return statements to sequential and parallel