new logic implemented