added simple command-line argument parser
clean code