use ready function.