callback must check first arg type