patch & optimization