use the ready callback instead