Added registry code