added tests for fpcga and cleanup for input array as 2d