add full,max, state set and check func