add namespace and organize functions into groups