struggling to understand better callback usage