added logging, closes #11