added main script with CLI interface