fixed some minor test problem
added test case for array variance