create sort algorithm and modifyed stack.