simplify import-from code a little by moving the name lookup into a utility function