to avoid duplicate code, maybe call setAsBox(hx, hy)