perfected prototype repo pattern