put some useful function code