minor updates from original fork