updated ending condition for load sensor loop