Added the support for ready function