refactored to send an array of objects to create a new user