Lab4/part3 added finished functions