updated to work with latest changes