add to get near rail functions