end of day, most works, need to fix udpate statemnt