import redesigned and logging introduced