I think this impl is now correct, will want to add a bigger test