replace when to if
fixing merge, again