update from toopay:master branch