This is a Modifyed version of the original radiant script