used a more appropriate function to get library's path