added logic to find core library