initial draft of functions in vmmap.c