Setting up the terminals