getting stuff ported from visual-repo