This is more of a private function, which i will make private, but i can add yard doc too.