updating with latest code from upstream