reorganized lib structure