implemented registry pattern for entities