Added input validator