added author and version info, improved stdin calling