corrected predict method, final commit