handle a tags smartly