prima work on simple graphs