move buffer dec, needs width and height vars