format clearly algorithm