finished functions assignment