added input restrictions and saveing restrictions