Change this to use BufferedImage