a little tweaking to make this tool useful