Example of pattern Factory