refactored a bit, added calm.custom, continued working on IDB implementation