added check for argument length
removed pointer error
improved commandline client