added new algorithm