add some common functions for admin