updated to gae
added matrix operations.