Implements #37 (!draft)