added script for new algorithm