attendance functions finished