internal method