with mike's fixes