add tests
fix multiple calls to ready();
refactor to remove ready variable

can just use the listeners list as a flag