algorithm moved to algorithm package