add helper function for libraries