Create doLogic