finish some function