added stdin support, removed -v flag