simpler version logic