added local expand (still buggy)