moving callbacks for faster, more correct