logic moved