three functions finished