Added non-static callback, closes #1