functions complete

finished functions