useful  code segments for daily work.