custom hook edit