more generic instance creation