Use ready callback instead of event