add functionality for main()