finalized functions