add read method for graph + fixes (add missing barriers)