ignoring regex . warning
adds if/else if/else statements