add input checking in Worker.new