predict function added