shadow algorithms