moved some stuff to execute on every "ready" event
more debug output