rewrote orm with callbacks