add callback and fix center