use Math.ceil for line comp