create a separate abstract function
fixing namespaces