implement changes discussed in #21