Refactor algorithm

added red font to alert