using readInit inside ready callback