further changes based on feedback from @eteq