use type hinting for $callback. update comments.