rename directory and break out misc. func.