Added three parameters for random task generation