onLoad method now uses a callback