Factory pattern fuck yeaaaah