all functions finished