goot the client to pass the data, need to add a loop