add option parsing via getopt
refactor main.cpp into class (needed later)