implemented getCol and getRow methods.