simplified logic