Implementation of the modified factory