Portability - make it work in sub-application