package restructuring in threads