Implemented a first version of #27