refactored for multiple tools and added command-line to select tool
command-line to select tool