Partially implemented new logic (BROKEN)