remove hard-coded graph builder
better error messages