defined three methods: getcol, getrow, getline