Wrote logical logic in uvp.c