Separated Callback function

Signed-off-by: Pascal Piche <pascal@nitriques.com>