Finished content-adding algorithm