unified the get package name methods

thanks to ryan for the neat suggestion