Credit Andrew/Andrea for defing procedure and putting into Latex format