commenting; simplified registry function