revise as the solution. :: no need to use a seperate factory class