edited layout add validations and along with other functions