after testing, come up with more elegant solution for initializing loupe