The medieval crafts guilds were groups of artists, architects, and craftsmen who formed an alliance to maintain high standards of workmanship, regulate trade and competition, and protect the secrets of their crafts. The guilds were usually composed of smaller workshops of associated crafts from the same town who banded together into larger groups for their own protection and prosperity. They operated on a Master, Journeyman and Apprentice system where the master would take on apprentices to train them in the skills of his craft. The apprentices were 'bound' to work for free for that master for a period of around five to nine years. In return the master would look after their welfare and education in the skills of his craft until they graduated as journeymen. As journeymen, they were not only paid for their work but also free to go and work for other masters. In time, if a journeyman demonstrated outstanding skill in his craft, he could advance in the guild to the position of master and take on his own apprentices.