wrote constructors for primitive generators