Add function to find mth to last element in stack