finish getopt parsing
for better readability add {} after if
added unit tests for basic option parsing