added negative capabilities to the algorithm