added test script
implemented functions for matrix caching assignment