[minor] use callback style so fn is actually set in square#build