edited from github [skip ci]