Add custom callback

Allows user to set a custom callback if needed.