Updated some common functions