move ready function into other script