added functionality to #24