first commit from mac - added validations