improved CLI testing