Adding new feature related to #16
Fix for #16