added validations, minor changes