make function static so it can be called safely