improved definitions and nico flipping changes