sync with source; license under GPL v3