Added features described in issue #9