fixed issue #4, made some consistency changes