Updated image algorithm