new engine. bug with infinite loop is fixed