made matrix class

added matrix class not sure if it works completely yet.