insert some missing logic