update layout swap