adding custom hook to form