allow combining parallel and sequential tasks

Fixes #51

I'm not sure if the fix is the best one and if tests should go to a separate file as I'm not sure what are the project conventions are... Anyway, I think that there is a bug hiding here which this PR should fix. Will be happy to amend the commit based on your directions.