add patch and head