working on issue #4 from the github issues