here is the file of sd calculation