Added basic algorithmic outline