private void floodFillRecursion(int x, int y, Color oldColor, Color newColor, BufferedImage image) // stackoverflows - BAD
	{
		if (x >= 0 && x < image.getWidth() && y >= 0 && y < image.getHeight()) // point is in bounds
		{
			Color currentColor = new Color(image.getRGB(x, y));
			if (!oldColor.equals(currentColor) || oldColor.equals(newColor)) // base case
			{
				return;
			}
			else
			{
				try
				// for debugging, delete try when solved
				{
					image.setRGB(x, y, newColor.getRGB());
					floodFillRecursion(x + 1, y, oldColor, newColor, image); // right
					floodFillRecursion(x - 1, y, oldColor, newColor, image); // left
					floodFillRecursion(x, y + 1, oldColor, newColor, image); // down
					floodFillRecursion(x, y - 1, oldColor, newColor, image); // up
					canvas.repaint();
				}
				catch (Exception e)
				{
					e.getMessage();
					return;
				}
			}
		}
	}