add namespace instead of global functions