Add feature as requested in #308