optimize comment algorithm