added algorithims