updated custody algorithm