base version

the version finished by Kyle's summer project. Combined both parallel
and single-threaded versions