memory allocated and freed correctly; using double rather than Pixel