added method executing console statement snippet