finished functions and errors