added model callbacks, closes #6