modified to input stime and etime