A better way to _getLibs