clone from code.google.com/p/rog-go