making function non-static to avoid compiler warning if not used