partial implementation of issue 22: \d