Throwing an error in the functions for dalivery, rework tests