program working according to spec