cleaned up and documented likely_write