added logic expression parsing and changed the type of graph