fork from https://github.com/flash-dog/flash-dog