added function to get number at certain date