changing algorithms app structure according to comments..