copied files from mccons repo