added edit view and validation