found os independant code for finding size of the terminal