modified way of grag init