simplified logic [ci skip]