Added functionality to resolve #24