Implemented #59, Hope this is ok @bugs