implement region data structure