simplifying create prediction now that api accepts field names as input and refactoring