add toptag functionality