fix algorithm and console application
readme