changed file structure, added red black tree for page segments