Addede rehh to return -1 for edge of window calculations