Final version with some changes to be made for modified tags