refactored tool to work with m5nr API and not directly to sql DB. still same functionality