main ready for algorithm call