Adding predict function

Adding an untested predict function.