Implementation of #35
Implementation of #35