added parameter checking to driver and expanded tests