seperate cmd line parsing from main