Run via main function