simplfied logic