add lib index
call Map constructor earlier
fix debug
add debug before this.set
use any graphs given to constructor