inspired from puppet-sparrow repo