finished functions of three