more handlers, plus some logic fix