changed the constructor to ignore whitespace in task names