this works and seems more principled