complete demo. left only with minor changes for future