misc tools for command line