Adding basic inital algorithm.