New utility function: predict