added edit, delete, and simple validations