bootstrapped with a few fixes