fixing issue #4, but definitely want to revisit