changed result into a list of objects