added factory design pattern basic : http://www.tutorialspoint.com/design_pattern/factory_pattern.htm