Matrix lib sort of implemented