update detail and main