added multitask functionality - fixes #3