simplified logic take 2