Added sortpic srtipt.