factory implemented
a little cleaned-up