Got the adjmat working properly with the flags