moved getSize to term.lua