fix callback definitions, add a few callbacks