Updated #148 so it can be integrated