one to many logic