finished logic for until request program