ready checks
Fix code and tests