added new logic