code of sift with comments