added val variable declaration + constraints