changed to accept date