You could modify this function to suit your needs....
# spicedb
c