add missing main() functionality