When Haydn visited Vienna, they sometimes performed impromptu concerts with string quartets.
As 1782 turned to 1783, Mozart became enthralled with the work of Bach and George Frederic Handel and this, in turn, resulted in several compositions in the Baroque style and influenced much of his later compositions, such as passages in Die Zauberflote(The Magic Flute) and the finale of Symphony Number 41. During this time, Mozart met Joseph Haydn and the two composers became admiring friends. When Haydn visited Vienna, they sometimes performed impromptu concerts with string quartets. Between 1782 and 1785 Mozart wrote six quartets dedicated to Haydn.