write some common tools for computional advertising