Added generalised reflection calculation