create a (math) function to halfsize