fixed class issues, parallel and non-parallel versions seem to be working