added missing "static" to helper function