updated arealib to use states (probably won't be used here)