Changed function name from "query" to "predict"