created gui version with validations