implement commandline parsing