added namespace main def for script usage