addresses several issues in #12