use graph for neighbor positions