fixed bugs, added proper output
forgot to git add