factory method memnto prototype and singleton