Added Factory method pattern