change delay to a standard library