m47

upadte algorithm part