copying from vcs_conversion branch for a cleaner diff