yup it work edit saves to database
re factor ugly codes