model callbacks, lib class