edited redirect to edit.erb and started fixing edited function