Simple Example for algorithm