function prediction implemented