revised for pixel size