added basic ready function and some stuff that verifies its functionality