organizing and fixing onReady