modify task constructor,made it simple