support different x y dimensions