added ability to change pixel size