change to use onready