added options
added test input stub
reimpl input using jinja2