version 1 of monte.c