added support for -v and -h options