finish some codes