Ender logic