bugs fixed, failed tests updated