cleaned up for publication