pass pie object to onload callback