refactorized code added the Revealing Prototype Pattern