still broken, but a lot more robust checking?